using UnityEngine;
using System.Collections;

public class PickupBehavior : MonoBehaviour {

	// Use this for initialization
	void Start () {
		// ...
	}
	
	// Update is called once per frame
	void Update () {
		// spin?
	}
	
	
	/**
	 * Handles collisions
	 **/
	void OnTriggerEnter( Collider other ) {
		if (GenerateObjects.getPlayer().gameObject == other.gameObject) {
			print ( "PICKUP Collided with player" );
			
			other.GetComponent<bulletFlightPath>().rangeOfError = 0;
			
			// kill pickup
			Destroy( this.gameObject );
		}
	}
}
